<script id="carouselTpl" type="text/html">
<div class="hhq-box" style="margin:20px;">
    <div class="hhq-box-hd">图片轮播</div>
    <!--<form class="layui-form carouselSubmitForm">-->
    <a class="layui-btn layui-btn-sm layui-btn-warm carouselSubmit" lay-submit lay-filter="carouselSubmit" style="float: right">保存设置</a>
    <div class="hhq-box-bd">
        <div class="layui-clear" id="carouselImgViewModuleParent">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">切换时间</label>
                        <div class="layui-input-inline" style="width: 260px">
                            <input type="text" name="interval" value="{{d.interval}}" placeholder="轮播图自动切换的间隔时间，单位:毫秒" class="layui-input" >
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">自动切换</label>
                        <div class="layui-input-inline" style="width: 260px">
                            <input type="text" name="autoplay" value="{{d.autoplay}}" placeholder="true或者false" class="layui-input" >
                        </div>
                    </div>
                </div>
                <div id="carouselImgView">

                </div>
                <button type="button" class="layui-btn layui-btn-primary layui-btn-fluid" id="addCarouselImg">添加卡片</button>
        </div>
    </div>
    <!--</form>-->
</div>
</script>
<script id="carouselImgTpl" type="text/html">
    <div class="layui-form-item carouselImgViewModule" style="background-color: #c4f8fb;position: relative;padding: 20px 0px 20px">
        <i class="layui-icon layui-icon-close" onclick="delCarouselImg(this);" style="font-size: 20px; color: #1E9FFF;background-color: #aaa;border-radius: 50%;position: absolute;right: -10px;top: -10px"></i>
        <div class="layui-block">
            <label class="layui-form-label">图片</label>
            <a type="button" class="layui-btn layui-btn-sm uploadCarouselImg">
                <i class="layui-icon">&#xe67c;</i>上传图片
            </a>
            <a type="button" class="layui-btn layui-btn-sm layui-btn-danger" onclick="delThisImg(this);" >
                删除图片
            </a>
            <div style="padding-top:10px;margin-left: 110px">
                <div class="img-wrap thisImg"  style="background:#f8f8f8;text-align:center;">

                    {{#  if(d.url != ''){ }}
                        <img src="{{d.url}}">
                    {{#  } else { }}
                    <span style="font-size:60px;line-height:207px;color:#eee;">图片</span>
                    {{#  } }}
                </div>
            </div>
        </div>
        <label class="layui-form-label">图片地址</label>
        <div class="layui-input-block" style="width: 300px">
            <input type="text" name="url" value="{{d.url}}" placeholder="" class="layui-input" >
        </div>
        <label class="layui-form-label">链接地址</label>
        <div class="layui-input-block" style="width: 300px">
            <input type="text" name="link" value="{{d.link}}" placeholder="http://" class="layui-input" >
        </div>
        <label class="layui-form-label">标题</label>
        <div class="layui-input-block" style="width: 300px">
            <input type="text" name="title" value="{{d.title}}" placeholder="" class="layui-input" >
        </div>
        <label class="layui-form-label">文本</label>
        <div class="layui-input-block" style="width: 300px">
            <textarea name="content" placeholder="请输入内容" class="layui-textarea">{{d.content}}</textarea>
        </div>
    </div>
</script>